package com.myhouse.biz.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.myhouse.biz.HouseBiz;
import com.myhouse.dao.HouseDao;
import com.myhouse.entity.House;


@Service("houseBiz")
public class HouseBizImpl implements HouseBiz{

	@Autowired
	private HouseDao houseDao;
	
	public List<House> getHouses(int districtId, int streetId, int typeId,
			String topic) {
		return houseDao.getHouses(districtId, streetId, typeId, topic);
	}

	public House getHouseById(int id) {
		return houseDao.getHouseById(id);
	}

	public boolean insertHouse(House house) {
		return houseDao.insertHouse(house);
	}

	public List<House> getAllByUse(int stateId) {
		return houseDao.getAllByUse(stateId);
	}

	public boolean updateHouseState(int state, int id) {
		return houseDao.updateHouseState(state, id);
	}
	
}
